package com.zhang.family_doctor.mapper;

import com.zhang.family_doctor.entity.Doctor;
import com.zhang.family_doctor.entity.TeamJoined;
import com.zhang.family_doctor.service.impl.TeamServiceImpl;

import java.util.List;

public interface TeamJoinedMapper {

    /**
     * 创建团队时添加到我加入的团队
     * @param teamJoined
     */
    void save(TeamJoined teamJoined);

    /**
     * 解散团队的同时清除我加入的团队
     * @param teamId
     */
    void delete(Integer teamId);

    /**
     * 根据id删除我加入的团队数据
     * @param id
     */
    void deleteTeamJoinById(Integer id);

    /**
     * 查询我加入的团队
     * @param id
     * @return
     */
    TeamJoined selectTeamJoinById(Integer id);

    /**
     * 根据医生id和团队id查询我加入的表
     * @param teamJoined
     * @return
     */
    TeamJoined selectTeamJoinByTeamIdAndDoctorId(TeamJoined teamJoined);

    /**
     * 根据团队id查询团队成员
     * @param id
     * @return
     */
    List<Doctor> selectTeamJoinByTeamId(Integer id);

    /**
     * 根据团队id查询队员
     * @param teamId
     * @return
     */
    List<TeamJoined> getTeamJoinedByTeamId(Integer teamId);
}